@extends('default.layouts.adminPublic')
@section('title', '微信菜单设置')

@section('headcss')
    @parent
    <link rel="stylesheet" href="{{asset('/default/css/admin/category.css')}}">
    @endsection
    @section('content')

    <!--导航开始-->
    <div class="crumb_warp">
        <i class="fa fa-home"></i> <a href="{{url('admin/coll_position')}}">首页</a> &raquo; 个人微信菜单设置
    </div>
    <!--导航结束-->
    <div class="con">
        <div class="manage">@include('flash::message')</div>
        <div class="conMain">

            <div class="cRight">
                <div class="list" style="left:15px;">
                    <div class="cTitle cTitleList"><i class="fa fa-folder" style="color: #333"></i>*添加顺序从左往右，子菜单名称、事件类型、事件值中的任意一项填写，其它俩项也要跟着填写  【子菜单如果添加了事件，主菜单的事件将会失效！】</div>
                    <div class="listBox">
                        <div class="listCon configDiv">
                            <ul>
                                <li class="optColl">
                                    <div class="options one">
                                        <dl>
                                            <dd class="opt_name" style="color: #333">一级菜单名称</dd>
                                            <dd class="opt_id">子菜单名称</dd>
                                            <dd class="opt_id">事件类型</dd>
                                            <dd class="operating">事件值</dd>
                                        </dl>
                                    </div>
                                </li>
                                <form action="{{ url($formUrl) }}" name="mpForm" id="mpForm" method="post">
                                    {{csrf_field()}}
                                    {{--#左边菜单--}}
                                    <li class="optColl">
                                        <div class="options optBefore">
                                        <dl>
                                            <dd class="opt_name nameColor config_right" id="oName">
                                                <input name="Mune[]" type="text" value="" maxlength="5" class="config_content_input" placeholder="微信左边第一个菜单名称">
                                            </dd>
                                            <dd class="opt_id" id="oCid"></dd>
                                            <dd class="opt_id">
                                                <select name="firstType[]">
                                                    <option value="">空</option>
                                                    <option value="click">点击事件</option>
                                                    <option value="view">外链地址</option>
                                                </select>
                                            </dd>
                                            <dd class="operating">
                                                <input name="firstLink[]" type="text" value="" class="config_content_input" placeholder="外链地址或事件值">
                                            </dd>
                                        </dl>
                                        </div>
                                    </li>{{--类别--}}
                                    {{--第1个子菜单--}}
                                    <li>
                                        <div class="options optBefore">
                                            <dl>
                                                <dd class="opt_name nameColor config_right" id="oName">├─</dd>
                                                <dd class="opt_id" id="oCid">
                                                    <input name="firstListMune[]" type="text" value="" class="config_content_input" placeholder="左边子菜单名称">
                                                </dd>
                                                <dd class="opt_id">
                                                    <select name="firstType[]">
                                                        <option value="">空</option>
                                                        <option value="click">点击事件</option>
                                                        <option value="view">外链地址</option>
                                                    </select>
                                                </dd>
                                                <dd class="operating">
                                                    <input name="firstLink[]" type="text" value="" class="config_content_input" placeholder="外链地址或事件值">
                                                </dd>
                                            </dl>
                                        </div>
                                    </li>
                                    {{--第2个子菜单--}}
                                    <li>
                                        <div class="options optBefore">
                                            <dl>
                                                <dd class="opt_name nameColor config_right" id="oName">├─</dd>
                                                <dd class="opt_id" id="oCid">
                                                    <input name="firstListMune[]" type="text" value="" class="config_content_input" placeholder="左边子菜单名称">
                                                </dd>
                                                <dd class="opt_id">
                                                    <select name="firstType[]">
                                                        <option value="">空</option>
                                                        <option value="click">点击事件</option>
                                                        <option value="view">外链地址</option>
                                                    </select>
                                                </dd>
                                                <dd class="operating">
                                                    <input name="firstLink[]" type="text" value="" class="config_content_input" placeholder="外链地址或事件值">
                                                </dd>
                                            </dl>
                                        </div>
                                    </li>
                                    {{--第3个子菜单--}}
                                    <li>
                                        <div class="options optBefore">
                                            <dl>
                                                <dd class="opt_name nameColor config_right" id="oName">├─</dd>
                                                <dd class="opt_id" id="oCid">
                                                    <input name="firstListMune[]" type="text" value="" class="config_content_input" placeholder="左边子菜单名称">
                                                </dd>
                                                <dd class="opt_id">
                                                    <select name="firstType[]">
                                                        <option value="">空</option>
                                                        <option value="click">点击事件</option>
                                                        <option value="view">外链地址</option>
                                                    </select>
                                                </dd>
                                                <dd class="operating">
                                                    <input name="firstLink[]" type="text" value="" class="config_content_input" placeholder="外链地址或事件值">
                                                </dd>
                                            </dl>
                                        </div>
                                    </li>
                                    {{--第4个子菜单--}}
                                    <li>
                                        <div class="options optBefore">
                                            <dl>
                                                <dd class="opt_name nameColor config_right" id="oName">├─</dd>
                                                <dd class="opt_id" id="oCid">
                                                    <input name="firstListMune[]" type="text" value="" class="config_content_input" placeholder="左边子菜单名称">
                                                </dd>
                                                <dd class="opt_id">
                                                    <select name="firstType[]">
                                                        <option value="">空</option>
                                                        <option value="click">点击事件</option>
                                                        <option value="view">外链地址</option>
                                                    </select>
                                                </dd>
                                                <dd class="operating">
                                                    <input name="firstLink[]" type="text" value="" class="config_content_input" placeholder="外链地址或事件值">
                                                </dd>
                                            </dl>
                                        </div>
                                    </li>
                                    {{--第5个子菜单--}}
                                    <li>
                                        <div class="options optBefore">
                                            <dl>
                                                <dd class="opt_name nameColor config_right" id="oName">├─</dd>
                                                <dd class="opt_id" id="oCid">
                                                    <input name="firstListMune[]" type="text" value="" class="config_content_input" placeholder="左边子菜单名称">
                                                </dd>
                                                <dd class="opt_id">
                                                    <select name="firstType[]">
                                                        <option value="">空</option>
                                                        <option value="click">点击事件</option>
                                                        <option value="view">外链地址</option>
                                                    </select>
                                                </dd>
                                                <dd class="operating">
                                                    <input name="firstLink[]" type="text" value="" class="config_content_input" placeholder="外链地址或事件值">
                                                </dd>
                                            </dl>
                                        </div>
                                    </li>

                                    {{--#中间菜单--}}
                                    <li class="optColl">
                                        <div class="options optBefore">
                                            <dl>
                                                <dd class="opt_name nameColor config_right" id="oName">
                                                    <input name="Mune[]" type="text" value="" maxlength="5" class="config_content_input" placeholder="微信中间菜单名称">
                                                </dd>
                                                <dd class="opt_id" id="oCid"></dd>
                                                <dd class="opt_id">
                                                    <select name="secondType[]">
                                                        <option value="">空</option>
                                                        <option value="click">点击事件</option>
                                                        <option value="view">外链地址</option>
                                                    </select>
                                                </dd>
                                                <dd class="operating">
                                                    <input name="secondLink[]" type="text" value="" class="config_content_input" placeholder="外链地址或事件值">
                                                </dd>
                                            </dl>
                                        </div>
                                    </li>{{--类别--}}
                                    {{--第1个子菜单--}}
                                    <li>
                                        <div class="options optBefore">
                                            <dl>
                                                <dd class="opt_name nameColor config_right" id="oName">├─</dd>
                                                <dd class="opt_id" id="oCid">
                                                    <input name="secondListMune[]" type="text" value="" class="config_content_input" placeholder="中间子菜单名称">
                                                </dd>
                                                <dd class="opt_id">
                                                    <select name="secondType[]">
                                                        <option value="">空</option>
                                                        <option value="click">点击事件</option>
                                                        <option value="view">外链地址</option>
                                                    </select>
                                                </dd>
                                                <dd class="operating">
                                                    <input name="secondLink[]" type="text" value="" class="config_content_input" placeholder="外链地址或事件值">
                                                </dd>
                                            </dl>
                                        </div>
                                    </li>
                                    {{--第2个子菜单--}}
                                    <li>
                                        <div class="options optBefore">
                                            <dl>
                                                <dd class="opt_name nameColor config_right" id="oName">├─</dd>
                                                <dd class="opt_id" id="oCid">
                                                    <input name="secondListMune[]" type="text" value="" class="config_content_input" placeholder="中间子菜单名称">
                                                </dd>
                                                <dd class="opt_id">
                                                    <select name="secondType[]">
                                                        <option value="">空</option>
                                                        <option value="click">点击事件</option>
                                                        <option value="view">外链地址</option>
                                                    </select>
                                                </dd>
                                                <dd class="operating">
                                                    <input name="secondLink[]" type="text" value="" class="config_content_input" placeholder="外链地址或事件值">
                                                </dd>
                                            </dl>
                                        </div>
                                    </li>
                                    {{--第3个子菜单--}}
                                    <li>
                                        <div class="options optBefore">
                                            <dl>
                                                <dd class="opt_name nameColor config_right" id="oName">├─</dd>
                                                <dd class="opt_id" id="oCid">
                                                    <input name="secondListMune[]" type="text" value="" class="config_content_input" placeholder="中间子菜单名称">
                                                </dd>
                                                <dd class="opt_id">
                                                    <select name="secondType[]">
                                                        <option value="">空</option>
                                                        <option value="click">点击事件</option>
                                                        <option value="view">外链地址</option>
                                                    </select>
                                                </dd>
                                                <dd class="operating">
                                                    <input name="secondLink[]" type="text" value="" class="config_content_input" placeholder="外链地址或事件值">
                                                </dd>
                                            </dl>
                                        </div>
                                    </li>
                                    {{--第4个子菜单--}}
                                    <li>
                                        <div class="options optBefore">
                                            <dl>
                                                <dd class="opt_name nameColor config_right" id="oName">├─</dd>
                                                <dd class="opt_id" id="oCid">
                                                    <input name="secondListMune[]" type="text" value="" class="config_content_input" placeholder="中间子菜单名称">
                                                </dd>
                                                <dd class="opt_id">
                                                    <select name="secondType[]">
                                                        <option value="">空</option>
                                                        <option value="click">点击事件</option>
                                                        <option value="view">外链地址</option>
                                                    </select>
                                                </dd>
                                                <dd class="operating">
                                                    <input name="secondLink[]" type="text" value="" class="config_content_input" placeholder="外链地址或事件值">
                                                </dd>
                                            </dl>
                                        </div>
                                    </li>
                                    {{--第5个子菜单--}}
                                    <li>
                                        <div class="options optBefore">
                                            <dl>
                                                <dd class="opt_name nameColor config_right" id="oName">├─</dd>
                                                <dd class="opt_id" id="oCid">
                                                    <input name="secondListMune[]" type="text" value="" class="config_content_input" placeholder="中间子菜单名称">
                                                </dd>
                                                <dd class="opt_id">
                                                    <select name="secondType[]">
                                                        <option value="">空</option>
                                                        <option value="click">点击事件</option>
                                                        <option value="view">外链地址</option>
                                                    </select>
                                                </dd>
                                                <dd class="operating">
                                                    <input name="secondLink[]" type="text" value="" class="config_content_input" placeholder="外链地址或事件值">
                                                </dd>
                                            </dl>
                                        </div>
                                    </li>

                                    {{--#右边个菜单--}}
                                    <li class="optColl">
                                        <div class="options optBefore">
                                            <dl>
                                                <dd class="opt_name nameColor config_right" id="oName">
                                                    <input name="Mune[]" type="text" value="" maxlength="5" class="config_content_input" placeholder="微信右边菜单名称">
                                                </dd>
                                                <dd class="opt_id" id="oCid"></dd>
                                                <dd class="opt_id">
                                                    <select name="thirdType[]">
                                                        <option value="">空</option>
                                                        <option value="click">点击事件</option>
                                                        <option value="view">外链地址</option>
                                                    </select>
                                                </dd>
                                                <dd class="operating">
                                                    <input name="thirdLink[]" type="text" value="" class="config_content_input" placeholder="外链地址或事件值">
                                                </dd>
                                            </dl>
                                        </div>
                                    </li>{{--类别--}}
                                    {{--第1个子菜单--}}
                                    <li>
                                        <div class="options optBefore">
                                            <dl>
                                                <dd class="opt_name nameColor config_right" id="oName">├─</dd>
                                                <dd class="opt_id" id="oCid">
                                                    <input name="thirdListMune[]" type="text" value="" class="config_content_input" placeholder="右边子菜单名称">
                                                </dd>
                                                <dd class="opt_id">
                                                    <select name="thirdType[]">
                                                        <option value="">空</option>
                                                        <option value="click">点击事件</option>
                                                        <option value="view">外链地址</option>
                                                    </select>
                                                </dd>
                                                <dd class="operating">
                                                    <input name="thirdLink[]" type="text" value="" class="config_content_input" placeholder="外链地址或事件值">
                                                </dd>
                                            </dl>
                                        </div>
                                    </li>
                                    {{--第2个子菜单--}}
                                    <li>
                                        <div class="options optBefore">
                                            <dl>
                                                <dd class="opt_name nameColor config_right" id="oName">├─</dd>
                                                <dd class="opt_id" id="oCid">
                                                    <input name="thirdListMune[]" type="text" value="" class="config_content_input" placeholder="右边子菜单名称">
                                                </dd>
                                                <dd class="opt_id">
                                                    <select name="thirdType[]">
                                                        <option value="">空</option>
                                                        <option value="click">点击事件</option>
                                                        <option value="view">外链地址</option>
                                                    </select>
                                                </dd>
                                                <dd class="operating">
                                                    <input name="thirdLink[]" type="text" value="" class="config_content_input" placeholder="外链地址或事件值">
                                                </dd>
                                            </dl>
                                        </div>
                                    </li>
                                    {{--第3个子菜单--}}
                                    <li>
                                        <div class="options optBefore">
                                            <dl>
                                                <dd class="opt_name nameColor config_right" id="oName">├─</dd>
                                                <dd class="opt_id" id="oCid">
                                                    <input name="thirdListMune[]" type="text" value="" class="config_content_input" placeholder="右边子菜单名称">
                                                </dd>
                                                <dd class="opt_id">
                                                    <select name="thirdType[]">
                                                        <option value="">空</option>
                                                        <option value="click">点击事件</option>
                                                        <option value="view">外链地址</option>
                                                    </select>
                                                </dd>
                                                <dd class="operating">
                                                    <input name="thirdLink[]" type="text" value="" class="config_content_input" placeholder="外链地址或事件值">
                                                </dd>
                                            </dl>
                                        </div>
                                    </li>
                                    {{--第4个子菜单--}}
                                    <li>
                                        <div class="options optBefore">
                                            <dl>
                                                <dd class="opt_name nameColor config_right" id="oName">├─</dd>
                                                <dd class="opt_id" id="oCid">
                                                    <input name="thirdListMune[]" type="text" value="" class="config_content_input" placeholder="右边子菜单名称">
                                                </dd>
                                                <dd class="opt_id">
                                                    <select name="thirdType[]">
                                                        <option value="">空</option>
                                                        <option value="click">点击事件</option>
                                                        <option value="view">外链地址</option>
                                                    </select>
                                                </dd>
                                                <dd class="operating">
                                                    <input name="thirdLink[]" type="text" value="" class="config_content_input" placeholder="外链地址或事件值">
                                                </dd>
                                            </dl>
                                        </div>
                                    </li>
                                    {{--第5个子菜单--}}
                                    <li>
                                        <div class="options optBefore">
                                            <dl>
                                                <dd class="opt_name nameColor config_right" id="oName">├─</dd>
                                                <dd class="opt_id" id="oCid">
                                                    <input name="thirdListMune[]" type="text" value="" class="config_content_input" placeholder="右边子菜单名称">
                                                </dd>
                                                <dd class="opt_id">
                                                    <select name="thirdType[]">
                                                        <option value="">空</option>
                                                        <option value="click">点击事件</option>
                                                        <option value="view">外链地址</option>
                                                    </select>
                                                </dd>
                                                <dd class="operating">
                                                    <input name="thirdLink[]" type="text" value="" class="config_content_input" placeholder="外链地址或事件值">
                                                </dd>
                                            </dl>
                                        </div>
                                    </li>

                                    <li class="config_center">
                                        <div class="options">
                                            <dl>
                                                <dt class="opt_sort"></dt>
                                                <dd class="opt_name config_bordernone" style="color: #333"></dd>
                                                <dd class="opt_id config_left config_bordernone">
                                                    <input type="submit" class="sub" value="创建微信菜单"/>
                                                </dd>
                                                <dd class="operating config_bordernone"></dd>
                                            </dl>
                                        </div>
                                    </li>
                                 </form>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection
@section('footerjs')
    @parent
    <script>
        errcode = "{{ session('errcode') }}";
        switch(errcode){
            case 'ok':
                layer.msg('菜单创建成功',{icon: 6});
                break;
            case 'err':
                layer.msg('菜单创建失败',{icon: 5});
                break;
            default:
                break;
        }
    </script>
@endsection